<%- include header%>

<div class="pub_tra">
	<div class="container" style="margin-top: -20px; padding: 50px;">
	<div class="col-lg-12 col-md-12 col-sm-12">
			<div class="col-lg-3 col-md-3 col-sm-3" 
				style="border: 1px solid #D9D9D9;height: 200px;box-shadow:0px 0px 2px #95A5A6">
			<div class="change">
			<span class="areas"><h4>选择城市：
				<% stras.forEach(function(post,index){%>
					<button  style="background: none;border: none;color: cadetblue;"><%= post.area%></button>
				<%})%></h4></span>
					
				
				
				<span class="days"><h4>旅游时长：
				<% stras.forEach(function(post,index){%>
				<a  id="time_day" style="cursor: pointer;"><%= post.days%></a>
				<%})%></h4></span>
				<span>
					<h4>
						
					</h4>
				</span>
			
		</div>
			</div>
			<div class="col-lg-8 col-md-8 col-sm-8">
					<div class="container-fluid" style="margin-bottom: 30px;">
			<div class="col-lg-9 col-sm-10 col-md-10 col-sm-10 search_stras" style="height: auto;" id="show">
			<% stras.forEach(function(post,index){%>
				<div  class="col-lg-10 col-sm-10 col-md-10 col-sm-10"
					 style="height:100px; overflow: hidden;">
				<p><h3>
					<a href="/u/<%= post.name%>/<%= post.time.day%>/<%= post.title%>">
					<%= post.title%>
				</a></h3></p>
				<p class="info">
					
					地点：<%= post.area%></a>
					
				</p>
				<p>时长：<%- post.days%>天</p>
				<p>住宿：<%- post.hotel%></p>
				<p>景点：<%- post.tourist%></p>
				<p>饮食：<%- post.food%></p>
				<p>路线：<%- post.routs%></p>
				
				</div>
				<!--<button class="btn btn-info">查看全文</button>-->
				<%})%>
				
		</div>
		</div>
			
			</div>
		</div>
		

				
		</div>
		
	</div>
</div>

<%- include footer%>
<link rel="stylesheet" href="/stylesheets/pub_tra.css" />


<script type="text/javascript">
	jq = jQuery.noConflict();
	jq(function(){
		var areaz='';
		var time_dayz='';
		jq(".areas button").on('click',function(){
			areaz=jq(this).text();
	});
	jq('.days h4 a').on('click',function(){
			 time_dayz=jq(this).text();
	});	
	jq('.change span').on('click',function(){
	
		console.log(areaz,time_dayz);
	jq.post('/poststra',{areas:areaz,time_days:time_dayz},function(data){
		if(data.length==0){
			jq(".search_stras div").show();
		}
		jq(".search_stras div").remove();
		data.forEach(function(post,index){
			jq(".search_stras").html("<div class='col-lg-10 col-sm-10 col-md-10 col-sm-10'style='height:100px; overflow: hidden;'></div>");
			jq(".search_stras div").html("<p><h3><a>"+post.title+"</a></h3><p class='info'><a>时间："+post.days+"</a></p></p>");
//			jq(".search_stras div").html("<p class='info'><a>时间："+post.days+"</a></p>");
		});
	});
	return false;
	
	})
	});
		
</script>


	<style>
		.container h3:first-child{
			margin-left: 30%;
			color:#4682B4; 
			font-family: '楷体'; 
			font-size: 35px; 
			font-weight: bold;
		}
		.container h4:first-child{
			font-size: 15px;
		}
		.container>h4>a{
			margin-left: 2%;
			padding-right: 20px;
		}
		#show>button{
			float: right;
			border:none;
			color: steelblue;
			background: none;
			
		}
		pre{
			border: none;
			background: none;
			font-size: 14px;
			line-height: 1.42857;
			font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
			color: #333;
		}
	</style>
